Skip to content

FIX: Audio files content check bug#1579

Merged
jbolor21 merged 4 commits intomicrosoft:mainfrom
jbolor21:users/bjagdagdorj/realtime_gui
Apr 9, 2026
Merged

FIX: Audio files content check bug#1579
jbolor21 merged 4 commits intomicrosoft:mainfrom
jbolor21:users/bjagdagdorj/realtime_gui

Conversation

@jbolor21
Copy link
Copy Markdown
Contributor

@jbolor21 jbolor21 commented Apr 8, 2026

Description

Sending audio files ie via Realtime is failing with the GUI because the whole base64 is being read by Path(piece.original_value).is_file(), which treats the whole string as a potential filename, which obviously is too long and thus errors out.
As a fix, this adds two guards:

  1. Length check (< 4096) — no real filesystem path is that long, so skip the check for base64 data
  2. try/except OSError — catch any remaining edge cases where the OS rejects the path

This lets the base64 audio data flow through to the serializer where it gets properly decoded and saved as a .wav file.

Tests and Documentation

Tested manually via UI and reran all tests and added new unit test

@jbolor21 jbolor21 marked this pull request as draft April 8, 2026 20:15
@jbolor21 jbolor21 changed the title [DRAFT] FIX: Realtime GUI bug FIX: Realtime GUI bug Apr 8, 2026
@jbolor21 jbolor21 marked this pull request as ready for review April 8, 2026 20:27
@jbolor21 jbolor21 changed the title FIX: Realtime GUI bug FIX: Audio files content check bug Apr 8, 2026
@jbolor21 jbolor21 merged commit 2f03898 into microsoft:main Apr 9, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants